package com.example.testproject.domain;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class PeopleProxy implements InvocationHandler {
    Object object = new Object();
    public PeopleProxy(Object object){
        this.object = object;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("no,He is lying");
        Object result = method.invoke(object,args);
        return result;
    }
}
